package com.wnx.job.modules.nms.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author 王乃醒是大帅哥
 * @since 2021-09-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ArticleParam implements Serializable {

    /**
     * 自增主键
     */
    @ApiModelProperty(value = "自增主键")
    private Long id;


    /**
     * 所属栏目ID
     */
    @ApiModelProperty(value = "所属栏目ID")
    @NotNull(message = "所属栏目ID不能为空")
    private Long channelId;

    /**
     * 咨询标题
     */
    @ApiModelProperty(value = "咨询标题")
    @NotBlank(message = "咨询标题不能为空")
    private String title;

    /**
     * 标题图片
     */
    @ApiModelProperty(value = "标题图片")
    private String titleImg;

    /**
     * 咨询摘要
     */
    @ApiModelProperty(value = "咨询摘要")
    @NotBlank(message = "咨询摘要不能为空")
    private String summary;

    /**
     * 附件地址
     */
    private String attachment;

    /**
     * 咨询作者
     */
    @ApiModelProperty(value = "咨询作者")
    @NotBlank(message = "咨询作者不能为空")
    private String author;

    /**
     * 咨询内容
     */
    @ApiModelProperty(value = "咨询内容")
    @NotBlank(message = "咨询内容不能为空")
    private String content;

    /**
     * 排序号
     */
    @ApiModelProperty(value = "排序号")
    @NotNull(message = "排序号不能为空")
    private Integer sort;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    private Date created;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "修改时间")
    private Date updated;

    /**
     * 状态
     */
    @NotNull(message = "状态值不能为空！")
    @ApiModelProperty(value = "状态:1激活0不激活")
    private Integer status;





    //*****************附加属性*************************//

    //附件属性
    private ArticleAttachmentParam articleAttachmentParam;

    //所属咨询分类栏目名
    private String channelName;

    //新闻咨询观看次数
    private Integer views;


    //*****************附加属性*************************//



}
